const KEY = 'user-token'
const USERNAME = 'user-name'
const ID = 'user-id'
// 存id
export const setId = (id) => {
  localStorage.setItem(ID, id)
}
// 取id
export const getId = () => localStorage.getItem(ID)

// 存token
export const setToken = (token) => {
  localStorage.setItem(KEY, token)
}
// 取token
export const getToken = () => localStorage.getItem(KEY)

// 删token
export const delToken = () => {
  localStorage.removeItem(KEY)
}
export const setName = (token) => {
  localStorage.setItem(USERNAME, token)
}
// 取token
export const getName = () => localStorage.getItem(USERNAME)

// 删token
export const delName = () => {
  localStorage.removeItem(USERNAME)
}
